/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "插件模板.h"

std::u16string f_插件模板_主文件() {
	std::u16string code;

	code += u"/*\n";
	code += u"插件模板\n";
	code += u"*/\n";


	code += u"#include <MBT_Engine.h> \n";
	code += u"#include <插件_节点构建.h> \n";

	code += u"\n";

	code += u"extern \"C\"  __declspec(dllexport) ";
	code += u"bool f_plugin_import(";

	code += u"std::map<std::u16string, S_插件模块>& 模块";

	code += u") { \n";
	code += u"\n";
	code += u"	return true;\n";
	code += u"}\n";


	code += u"extern \"C\"  __declspec(dllexport) ";
	code += u"bool f_plugin_uninstall(";

	code += u"std::map<std::u16string, S_插件模块>& 模块";

	code += u") { \n";
	code += u"	return true;\n";
	code += u"}\n";


	code += u"\n";
	return code;
}

std::string f_插件模板_节点代码() {
	std::string code;

	code += "bool f_nodePlugin_创建(C_节点基类* node);\n";
	code += "bool f_nodePlugin_销毁(C_节点基类* node);\n";
	code += "E_节点执行 f_nodePlugin_更新(C_节点基类* node);\n";
	code += "bool f_nodePlugin_复制(C_节点基类* 目标节点, const class C_节点基类* 源节点);\n";
	code += "\n";

	code += "bool f_nodePlugin_创建(C_节点基类* node) {\n";
	code += "	return true;\n";
	code += "}\n";

	code += "bool f_nodePlugin_销毁(C_节点基类* node) {\n";
	code += "	return true;\n";
	code += "}\n";

	code += "E_节点执行 f_nodePlugin_更新(C_节点基类* node) {\n";
	code += "	return E_节点执行::e_节点执行_传递;\n";
	code += "}\n";

	code += "bool f_nodePlugin_复制(C_节点基类* 目标节点, const class C_节点基类* 源节点) {\n";
	code += "	return true;\n";
	code += "}\n";

	return code;
}

std::string f_插件模板_变换操作代码() {
	std::string code;

	code += "bool f_plugin_变换操作(E_变换 type);\n";
	code += "bool f_plugin_移动变换操作(S_物体* ob, vec3 开始位置, vec3 当前位置, E_轴向 轴向);\n";
	code += "bool f_plugin_旋转变换操作(S_物体* ob, float32 开始弧度, float32 当前弧度, E_轴向 轴向);\n";
	code += "bool f_plugin_缩放变换操作(S_物体* ob, float32 缩放, E_轴向 轴向);\n";
	code += "\n";

	code += "bool f_plugin_开始变换操作(E_变换 type) {\n";
	code += "	return true;\n";
	code += "}\n";
	code += "\n";

	code += "bool f_plugin_移动变换操作(S_物体* ob, vec3 开始位置, vec3 当前位置, E_轴向 轴向) {\n";
	code += "	return true;\n";
	code += "}\n";
	code += "\n";

	code += "bool f_plugin_旋转变换操作(S_物体* ob, float32 开始弧度, float32 当前弧度, E_轴向 轴向) {\n";
	code += "	return true;\n";
	code += "}\n";
	code += "\n";

	code += "bool f_plugin_缩放变换操作(S_物体* ob, float32 缩放, E_轴向 轴向) {\n";
	code += "	return true;\n";
	code += "}\n";
	code += "\n";

	code += "bool f_plugin_完成变换操作(E_变换 type) {\n";
	code += "	return true;\n";
	code += "}\n";
	code += "\n";

	return code;
}

std::string f_插件模板_物体代码() {
	std::string code;

	code += "bool f_plugin_物体创建(std::vector<S_物体*>& 新物体, bool 立即);\n";
	code += "bool f_plugin_物体销毁(std::vector<S_物体*>& 新物体, bool 立即);\n";
	code += "bool f_plugin_物体选择(const std::vector<S_物体*>& 选择物体);\n";
	code += "bool f_plugin_物体更新(const std::vector<S_物体*>& 选择物体);\n";
	code += "\n";

	code += "bool f_plugin_物体创建(S_物体* ob, vec3 开始位置, vec3 当前位置) {\n";
	code += "	return true;\n";
	code += "}\n";
	code += "\n";

	code += "bool f_plugin_物体销毁(S_物体* ob, float32 开始弧度, float32 当前弧度) {\n";
	code += "	return true;\n";
	code += "}\n";
	code += "\n";

	code += "bool f_plugin_物体选择(const std::vector<S_物体*>& 选择物体) {\n";
	code += "	return true;\n";
	code += "}\n";
	code += "\n";

	code += "bool f_plugin_物体更新(const std::vector<S_物体*>& 选择物体) {\n";
	code += "	return true;\n";
	code += "}\n";
	code += "\n";

	return code;
}


